home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
winter_challenge.swf
/
scripts
/
frame_8
/
PlaceObject2_102_98
/
CLIPACTIONRECORD onClipEvent(load).as
< prev
Wrap
Text File
|
2011-08-19
|
879b
|
27 lines
onClipEvent(load){
function getPoints()
{
point = new object();
point.x = _root.ATVclip.ATV._x;
point.y = _root.ATVclip.ATV._y;
_root.ATVclip.ATV.localToGlobal(point);
}
function doSmoke(thisTire)
{
getPoints();
duplicateMovieClip(_root.originalsmoke,"smoke" + smokeOnstage,16384 + (8520 + smokeOnstage));
thisSmoke = eval("_root.smoke" + smokeOnstage);
thisSmoke._x = point.x + int(random(5) + 2) * (1 - random(2) * 2);
thisSmoke._y = point.y + int(random(5) + 2) * (1 - random(2) * 2);
maxHitpoints = 75;
currentHitpoints = _root.hitpoints;
newAlpha = Math.abs(currentHitpoints / maxHitpoints) * 100;
newAlpha = 100 - newAlpha;
thisSmoke._alpha = newAlpha;
thisSmoke.play();
smokeOnstage++;
}
maxSmokes = 30;
smokeOnstage = 100;
}